// Stock status utility functions

// Get stock status text
export function getStockStatusText(storNum: string | number): string {
  const stock = parseFloat(String(storNum))
  return stock < 100 ? '紧张' : '充足'
}

// Get stock status CSS class
export function getStockStatusClass(storNum: string | number): string {
  const stock = parseFloat(String(storNum))
  return stock < 100 ? 'text-red-600 font-medium' : 'text-green-600 font-medium'
}

// Check if stock is low (less than 100)
export function isStockLow(storNum: string | number): boolean {
  const stock = parseFloat(String(storNum))
  return stock < 100
}

// Check if stock is sufficient (100 or more)
export function isStockSufficient(storNum: string | number): boolean {
  const stock = parseFloat(String(storNum))
  return stock >= 100
} 